//
//  Utility.m
//  Whisper
//
//  Created by thohd on 16/05/2010.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "Utility.h"
#import <UIKit/UIKit.h>

@implementation Utility

+ (void) showNoDataLabel: (UIView*) containView
{
	UILabel *myLabel = [[UILabel alloc] initWithFrame:CGRectMake(containView.bounds.size.width / 2 - 75, containView.bounds.size.height / 2 - 25, 150, 50)];
	myLabel.text = @"No Data!";
	[containView addSubview:myLabel];
	myLabel.backgroundColor = [UIColor clearColor]; // [UIColor brownColor];
	myLabel.font = [UIFont fontWithName:@"Helvetica" size: 36.0];
	myLabel.textAlignment = UITextAlignmentCenter; // UITextAlignmentCenter, UITextAlignmentLeft
	myLabel.textColor = [UIColor whiteColor];
	[myLabel release];
	
}
+ (void) showAlert: (NSString*) msg
{
	[[[[UIAlertView alloc] initWithTitle: nil
								 message: msg
								delegate: nil
					   cancelButtonTitle: @"OK"
					   otherButtonTitles: nil] autorelease] show];
}
@end
